package com.ruoyi.compensationManagement.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.compensationManagement.domain.CompensationRetirespayrollLog;
import com.ruoyi.compensationManagement.service.ICompensationRetirespayrollLogService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 退休人员补贴工资修改日志Controller
 *
 * @author ruoyi
 * @date 2022-10-16
 */
@RestController
@RequestMapping("/compensationManagement/retiresPayrollLog")
public class CompensationRetirespayrollLogController extends BaseController
{
    @Autowired
    private ICompensationRetirespayrollLogService compensationRetirespayrollLogService;

    /**
     * 查询退休人员补贴工资修改日志列表
     */
    @PreAuthorize("@ss.hasPermi('compensationManagement:retiresPayrollLog:list')")
    @GetMapping("/list")
    public TableDataInfo list(CompensationRetirespayrollLog compensationRetirespayrollLog)
    {
        startPage();
        List<CompensationRetirespayrollLog> list = compensationRetirespayrollLogService.selectCompensationRetirespayrollLogList(compensationRetirespayrollLog);
        for (CompensationRetirespayrollLog retirespayroll : list) {
            retirespayroll.setLogInfoList(retirespayroll.getLogInfo().split("\n"));
        }
        return getDataTable(list);
    }

}
